# include <iostream>
# include "SimpleFactory.h"
# include "Factory.h"
# include "AbstractoryFactory.h"

void testSimpleFactory()
{
    BookFactory fac;
    Book* book1 = fac.factoryMethod("NetWork");
    book1->Name();
    Book* book2 = fac.factoryMethod("System");
    book2->Name();
}

void testFactory()
{
    TVfactory* factor1 = new HisenseTVFactory();
    TV* tv1 = factor1->produceTV();
    tv1->Play();
    TVfactory* factor2 = new HaierTVFactory();
    TV* tv2 = factor2->produceTV();
    tv2->Play();
}

void AbstractFactory()
{
    ComFactory* hp = new HPFactory();
    ComFactory* dell = new DellFactory();
    hp->CreateKeyBord()->Say();
    hp->CreateMouth()->Say();
    dell->CreateKeyBord()->Say();
    dell->CreateMouth()->Say();
    return;
}

int main() {
    //testFactory();
    AbstractFactory();
    return 0;
}